/*
 * @Descripttion: 测试TokenEncrypt的接口
 * @Author: yubo
 * @Date: 2022-08-30 12:52:55
 * @LastEditTime: 2022-08-30 13:01:53
 */
#include "TokenEncrypt.h"

#include <stdio.h>
#include <string.h>
#include <time.h>

int main(int argc, char* argv[])
{
    InitParam iParam{};
    strcpy(iParam.public_key_file, "ssl.pem");
    if(token_init(&iParam) == -1)
    {
        printf("token_encrypt failed, %s\n", iParam.err_msg);
    }

    TokenParam tParam{};
    strcpy(tParam.fund_account, "123456");
    tParam.account_type = '0';
    tParam.login_type = 6;
    strcpy(tParam.time_stamp, "20220830130404");
    if (token_encrypt(&tParam) == -1)
    {
        printf("token_encrypt failed, %s\n", tParam.err_msg);
    }
    else{
        printf("success\noutput = %s", tParam.token);
    }
}